import functools

def decorator1(func):
    @functools.wraps(func)
    def wapper1(*args,**kwargs):
        print("执行装饰器1")
        func(*args,**kwargs) # wapper2()
    return wapper1

def decorator2(func):
    @functools.wraps(func)
    def wapper2(*args,**kwargs):
        print("执行装饰器2")
        func(*args,**kwargs) # welcome()
    return wapper2

# @decorator1
# @decorator2
def welcome(message):
    print(message)

# 等价于
new_welcome = decorator1(decorator2(welcome))
# new_welcome = wapper1


new_welcome("welcome to daxiong course") # wapper1("welcome to daxiong course")
# welcome("welcome to daxiong course")